package com.qianyue.decorator;

/**
 * TODO
 *
 * @author qian yue
 * @version v1.0.0
 * @since 2025/2/3 19:35
 */
public class Client {
    public static void main(String[] args) {
        FastFood food = new FriedRice();
        System.out.println(food.getDescription() + "   " + food.cost());
        // 加个蛋
        food = new Egg(food);
        System.out.println(food.getDescription() + "   " + food.cost());
        // 再加个蛋
        food = new Egg(food);
        System.out.println(food.getDescription() + "   " + food.cost());
        //  加个培根
        food = new Bacon(food);
        System.out.println(food.getDescription() + "   " + food.cost());
    }
}
